<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      			xmlns:h="http://java.sun.com/jsf/html"
      			xmlns:f="http://java.sun.com/jsf/core"
      			xmlns:ui="http://java.sun.com/jsf/facelets"
      			xmlns:a4j="http://richfaces.org/a4j"
      			xmlns:rich="http://richfaces.org/rich"
				template="/site/private/template/template.xhtml">
				
	<ui:define name="conteudo">
	
		<h:form id="form">
	
		<br/>
	
		<div align="center">
			<span><h:outputLabel value="${mensagem['parceiro.titulo']}" /></span>
		</div>
		
		<br/>
	
		<h:panelGrid columns="2" width="100%">
		
			<h:outputLabel value="${mensagem['parceiro.nome']}:" />
			<h:inputText value="#{parceiroListMB.view.filtro.nome}" /> 
		
		</h:panelGrid>
		
		<br/>
		
		<h:panelGrid columns="3">
			<h:commandButton action="#{parceiroListMB.consultar}" value="${mensagem.consultar}" />
	    </h:panelGrid>
		
		<br/>
		
		<h:panelGrid width="100%">
	   
	       <rich:dataTable id="dataGrid" value="${parceiroListMB.view.list}" rows="10" var="element" rendered="${not empty parceiroListMB.view.list}" style="width:100%; text-align: center;" >	
	            
	            <rich:column>  
	                <f:facet name="header">
	                    <h:outputText value="#{mensagem['parceiro.list.id']}" />
	                </f:facet>
	                <h:outputText value="${element.id}" />
	            </rich:column>
	            
	            <rich:column> 
	                <f:facet name="header">
	                    <h:outputText value="${mensagem['parceiro.list.nome']}" />
	                </f:facet>
	                <h:outputText value="${element.nome}" />
	            </rich:column>
	            
	            <rich:column>  
	                <f:facet name="header">
	                    <h:outputText value="#{mensagem['parceiro.list.ativo']}" />
	                </f:facet>
	                <h:outputText value="${element.ativo}" />
	            </rich:column>
	           
	            <rich:column style="width:50px;">
	                <f:facet name="header">
	                    <h:outputText value="${mensagem.editar}" />
	                </f:facet>
                	<h:commandButton image="/site/private/resources/image/crud/edit.png" value="${mensagem.editar}" action="#{parceiroEditMB.preEditar}">
	                	<f:setPropertyActionListener target="${parceiroEditMB.view.entidade}" value="${element}"></f:setPropertyActionListener>
	                </h:commandButton>
	            </rich:column>
	            <rich:column style="width:50px;">
	                <f:facet name="header">
	                    <h:outputText value="${mensagem.visualizar}" />
	                </f:facet>
	                <h:commandButton image="/site/private/resources/image/crud/search.png" value="${mensagem.visualizar}" action="#{parceiroEditMB.visializar}">
	                	<f:setPropertyActionListener target="${parceiroEditMB.view.entidade}" value="${element}"></f:setPropertyActionListener>
	                </h:commandButton>
	            </rich:column>
	            <rich:column style="width:50px;">
	                <f:facet name="header">
	                    <h:outputText value="${mensagem.excluir}" />
	                </f:facet>
	                <h:commandButton image="/site/private/resources/image/crud/delete.png" value="${mensagem.excluir}" action="#{parceiroEditMB.preExcluir}">
	                	<f:setPropertyActionListener target="${parceiroEditMB.view.entidade}" value="${element}"></f:setPropertyActionListener>
	                </h:commandButton>
	            </rich:column>
	            
	            <f:facet name="footer">
	            	<rich:dataScroller for="dataGrid" maxPages="5"></rich:dataScroller>
	            </f:facet>
	           
	        </rich:dataTable>
	        
	  	</h:panelGrid>
	  	
	  	<h:panelGrid>
	  		<h:commandButton action="#{parceiroEditMB.preInserir}" value="${mensagem.inserir}" />
	  	</h:panelGrid>
	  	
	  	</h:form>
	  	
	</ui:define>
		
</ui:composition>
